package com.easylinkin.sm.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.easylinkin.sm.context.SmLoginInfoProducer;

import site.morn.framework.context.LoginInfoProducer;
import site.morn.framework.context.dto.BaseLoginInfo;

/**
 * 用户管理自动化配置
 *
 * @author TianGanLin
 * @since 1.0.0, 2019/9/2
 */
@Configuration
public class SmAutoConfiguration {

  /**
   * 注册当前用户生产者
   */
  @Bean
  @ConditionalOnMissingBean
  public LoginInfoProducer<BaseLoginInfo> loginInfoProducer() {
    return new SmLoginInfoProducer();
  }
}
